	@include('admin.head')
	<div class="container">
		<div class="row">
			@include('admin.side')
			<div class="col-md-10" id="content-wrapper">
				<div class="row">
					<div class="col-xs-12">
						<div class="main-box clearfix">
							<div class="clearfix">
								<h2 class="pull-left">产品详细</h2>
							</div>
							<div class="panel panel-default">
								<div class="panel-body">
								  	<div class="row">
								  		<!-- <div class="col-xs-4">
								  			<button class="btn btn-primary pull_right" pid="" id="doEdit"><i class="fa fa-eye"></i></i> 审核</button>
								  		</div> -->
								  	</div>
								  	<div class="form-horizontal">

										<div class="form-group">
											<label class="col-xs-4 control-label no_padding_top ">产品名称:</label>
											<div class="col-xs-5 uc_value _left" id="name">
											</div>
										</div>

										<div class="form-group">
										    <label class="col-xs-4  control-label no_padding_right">产品价格:</label>
										    <div class="col-xs-4" id="price">
										    </div>
										 </div>

									    <div class="form-group">
									      <label class="col-xs-4  control-label no_padding_right">产品图片:</label>
									      <div class="col-xs-4">
									        <image id="image" src="" width="100">
									      </div>
									    </div>

								        <div class="form-group">
						    	      		<label for="select" class="col-xs-4 control-label no_padding_right">产品详情介绍:</label>
						    	      		<div class="col-xs-6 uc_value _left" id="content">

							    	    	</div>
						    	    	</div>

										<div class="form-group">
								      		<label for="select" class="col-xs-4 control-label no_padding_right">审核:</label>
									      	<div class="col-xs-2">
										        <select class="form-control input_size" name="verify_state">
										          <option value="0">待审核</option>
										          <option value="1">审核通过</option>
										          <option value="2">审核不通过</option>
										        </select>
									        </div>
									        <div class="col-xs-3 no_padding_both">
										      	<button class="btn btn-primary" id="audit">提交</button>
										    </div>
								    	</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	@include("admin.footer")
	@include("admin.common")
</body>
<script type="text/javascript">
var did = "<%Input::get('did')%>";

$.get("",{did : did},function(data){
	if(data.success){
		$("#name").html(data.name);
		$("#price").html(data.price);
		$("#image").attr("src", "<%url('images')%>/"+data.uid+"/<%env('TECH_DIR')%>/"+data.image);
		$("#container").html(decodeURIComponent(data.content));
	}
})


$("#audit").click(function(){
	var state = $("select[name='verify_state']").val();
	$.post("audit", {did : did, state : state}, function (data){
		if(data.success)
		{
			success("", "修改成功");
			setTimeout(function(){
				window.location.href="../device";
			}, 2000)
		}
	})
})

</script>

</html>